package edu.gatech.oad.OTConfig;

import static org.junit.Assert.*;



import org.junit.Before;
import org.junit.Test;
public class AkbarDhannaniTest {
	WagonInventory inventory;
	//Wagon wagon;
	@Before
	public void setUp() throws Exception {
		inventory = new WagonInventory(3500);

	//	 wagon = Wagon.getWagon();
		 
	}
	
	@Test
	public void addTest(){
		assertEquals("Oxen quantity is not 0",0,inventory.get(0).getQuantity());
		inventory.add(new Item("Oxen",10,0,40));
		assertEquals("Oxen quantity is not 10",10,inventory.get(0).getQuantity());
		inventory.setCapacity(50);
		assertEquals("Capacity is not 50",50,inventory.getCapacity());
		assertEquals("Wheel quantity is not 0",0,inventory.get(4).getQuantity());
		inventory.add(new Item("Wheels",5,0,10));
		assertEquals("Wheel quantity is not 5",5,inventory.get(4).getQuantity());
		assertFalse("Added quantity while weight exceeded",inventory.add(new Item("Wheels",1,0,10)));
		assertEquals("Wheel quantity is not 5",5,inventory.get(4).getQuantity());
		assertEquals("Wagon weight is not 375",375,inventory.getCurWeight());
		inventory.setCapacity(3500);
		assertEquals("Capacity is not 3500",3500,inventory.getCapacity());
		inventory.add(new Item("Cars",1,0,20));
		assertEquals("Wagon weight is not 375",375,inventory.getCurWeight());
		
		
	}

}
